/* Copyright 2018 JDCLOUD.COM

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http:#www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.





Contact: 

NOTE: This class is auto generated by the jdcloud code generator program.
*/

 

#ifndef JdwModel_h
#define JdwModel_h
#import <JDCloudOCSDKCharge/JDCloudOCSDKCharge.h>

@interface NodeType :NSObject

/// 节点规格代码
@property (strong,nonatomic,nonnull)  NSString*  nodeTypeValue;

/// CPU核数
@property (strong,nonatomic,nonnull)  NSNumber*  cpu;

/// 内存容量，单位GB
@property (strong,nonatomic,nonnull)  NSNumber*  memory;

/// 存储空间容量，单位GB
@property (strong,nonatomic,nonnull)  NSNumber*  storage;

/// 最小节点数量
@property (strong,nonatomic,nonnull)  NSNumber*  miniNodeNumber;

/// 最大节点数量
@property (strong,nonatomic,nonnull)  NSNumber*  maxNodeNumber;


-(id) initWithNodeTypeValue:(NSString*) nodeTypeValue
    cpu:(NSNumber*)cpu
    memory:(NSNumber*)memory
    storage:(NSNumber*)storage
    miniNodeNumber:(NSNumber*)miniNodeNumber
    maxNodeNumber:(NSNumber*)maxNodeNumber;
-(NSMutableDictionary*) dictionary;

-(id) initWithDic:(NSDictionary*)dictionary;                    
@end
@interface Node :NSObject

/// 节点类型：Master，Segment-N
@property (strong,nonatomic,nonnull)  NSString*  nodeRole;

/// 节点状态，Available：运行， Failure：故障
@property (strong,nonatomic,nonnull)  NSString*  nodeStatus;

/// CPU使用率
@property (strong,nonatomic,nonnull)  NSString*  cpuUtilization;

/// 内存使用率
@property (strong,nonatomic,nonnull)  NSString*  memoryUtilization;

/// 磁盘使用率
@property (strong,nonatomic,nonnull)  NSString*  diskUtilization;


-(id) initWithNodeRole:(NSString*) nodeRole
    nodeStatus:(NSString*)nodeStatus
    cpuUtilization:(NSString*)cpuUtilization
    memoryUtilization:(NSString*)memoryUtilization
    diskUtilization:(NSString*)diskUtilization;
-(NSMutableDictionary*) dictionary;

-(id) initWithDic:(NSDictionary*)dictionary;                    
@end
@interface DBInstanceAttribute :NSObject

/// 实例ID
@property (strong,nonatomic,nonnull)  NSString*  instanceId;

/// 实例名称
@property (strong,nonatomic,nonnull)  NSString*  instanceName;

/// 实例规格
@property (strong,nonatomic,nonnull)  NSString*  nodeType;

/// 节点数量
@property (strong,nonatomic,nonnull)  NSNumber*  nodeNumber;

/// 可用区
@property (strong,nonatomic,nonnull)  NSString*  azId;

/// VPCID
@property (strong,nonatomic,nonnull)  NSString*  vpcId;

/// 子网ID
@property (strong,nonatomic,nonnull)  NSString*  subnetId;

/// 域名
@property (strong,nonatomic,nonnull)  NSString*  instanceDomain;

/// 端口号
@property (strong,nonatomic,nonnull)  NSString*  instancePort;

/// 数据库账号
@property (strong,nonatomic,nonnull)  NSString*  accountName;

/// 实例状态，Available：运行， Failure：故障 ，Creating：创建中， Deleting：删除中
@property (strong,nonatomic,nonnull)  NSString*  instanceStatus;

/// 创建时间
@property (strong,nonatomic,nonnull)  NSString*  createTime;

/// 节点信息
@property (strong,nonatomic,nonnull)  NSArray<Node*>*  nodes;

/// 计费配置
@property (strong,nonatomic,nonnull)  Charge*  charge;


-(id) initWithInstanceId:(NSString*) instanceId
    instanceName:(NSString*)instanceName
    nodeType:(NSString*)nodeType
    nodeNumber:(NSNumber*)nodeNumber
    azId:(NSString*)azId
    vpcId:(NSString*)vpcId
    subnetId:(NSString*)subnetId
    instanceDomain:(NSString*)instanceDomain
    instancePort:(NSString*)instancePort
    accountName:(NSString*)accountName
    instanceStatus:(NSString*)instanceStatus
    createTime:(NSString*)createTime
    nodes:(NSArray<Node*>*)nodes
    charge:(Charge*)charge;
-(NSMutableDictionary*) dictionary;

-(id) initWithDic:(NSDictionary*)dictionary;                    
@end
@interface DBInstanceSpec :NSObject

/// 实例名称，名称只支持数字、小写字母、中文及英文下划线，且不少于2字符不超过32字符；未填写取实例ID作为实例名称
@property (strong,nonatomic,nonnull)  NSString*  instanceName;

/// 节点规格，目前支持jdw.dc1.4xlarge
@property (strong,nonatomic,nonnull)  NSString*  nodeType;

/// 节点数量，目前支持3个
@property (strong,nonatomic,nonnull)  NSNumber*  nodeNumber;

/// 可用区
@property (strong,nonatomic,nonnull)  NSString*  azId;

/// VPCID
@property (strong,nonatomic,nonnull)  NSString*  vpcId;

/// 子网ID
@property (strong,nonatomic,nonnull)  NSString*  subnetId;

/// 数据库账号，账号只支持数字、大小写字母及英文下划线“_”，不超过16字符 ，非必填
@property (strong,nonatomic,nonnull)  NSString*  accountName;

/// 数据库密码，密码必须包含且只支持大小写字母及数字，不少于8字符不超过16字符，非必填，可创建后设置
@property (strong,nonatomic,nonnull)  NSString*  accountPassword;

/// 计费规格，包括计费类型，计费周期等
@property (strong,nonatomic,nonnull)  ChargeSpec*  chargeSpec;


-(id) initWithInstanceName:(NSString*) instanceName
    nodeType:(NSString*)nodeType
    nodeNumber:(NSNumber*)nodeNumber
    azId:(NSString*)azId
    vpcId:(NSString*)vpcId
    subnetId:(NSString*)subnetId
    accountName:(NSString*)accountName
    accountPassword:(NSString*)accountPassword
    chargeSpec:(ChargeSpec*)chargeSpec;
-(NSMutableDictionary*) dictionary;

-(id) initWithDic:(NSDictionary*)dictionary;                    
@end
@interface DBInstance :NSObject

/// 实例ID
@property (strong,nonatomic,nonnull)  NSString*  instanceId;

/// 实例名称
@property (strong,nonatomic,nonnull)  NSString*  instanceName;

/// 节点规格
@property (strong,nonatomic,nonnull)  NSString*  nodeType;

/// CPU核数
@property (strong,nonatomic,nonnull)  NSNumber*  cpu;

/// 内存容量，单位GB
@property (strong,nonatomic,nonnull)  NSNumber*  memory;

/// 存储空间容量，单位GB
@property (strong,nonatomic,nonnull)  NSNumber*  storage;

/// 节点数量
@property (strong,nonatomic,nonnull)  NSNumber*  nodeNumber;

/// 可用区
@property (strong,nonatomic,nonnull)  NSString*  azId;

/// VPCID
@property (strong,nonatomic,nonnull)  NSString*  vpcId;

/// 子网ID
@property (strong,nonatomic,nonnull)  NSString*  subnetId;

/// 实例状态
@property (strong,nonatomic,nonnull)  NSString*  instanceStatus;

/// 创建时间
@property (strong,nonatomic,nonnull)  NSString*  createTime;

/// 计费配置
@property (strong,nonatomic,nonnull)  Charge*  charge;


-(id) initWithInstanceId:(NSString*) instanceId
    instanceName:(NSString*)instanceName
    nodeType:(NSString*)nodeType
    cpu:(NSNumber*)cpu
    memory:(NSNumber*)memory
    storage:(NSNumber*)storage
    nodeNumber:(NSNumber*)nodeNumber
    azId:(NSString*)azId
    vpcId:(NSString*)vpcId
    subnetId:(NSString*)subnetId
    instanceStatus:(NSString*)instanceStatus
    createTime:(NSString*)createTime
    charge:(Charge*)charge;
-(NSMutableDictionary*) dictionary;

-(id) initWithDic:(NSDictionary*)dictionary;                    
@end

#endif /* JdwModel_h */
